# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

inherit webapp mono

MYPN="NeatUpload"
MYP=${MYPN}-${PV}
S=${WORKDIR}/${MYP}

DESCRIPTION="NeatUpload allows ASP.NET developers to stream uploaded files to storage and allows users to monitor upload progress. It works under Mono's XSP/mod_mono as well as Microsoft's ASP.NET implementation."
HOMEPAGE="http://www.brettle.com/neatupload/"
SRC_URI="http://www.brettle.com/Data/Sites/1/${MYP}.tar.gz"
IUSE="$IUSE"
LICENSE="GPL-2"
KEYWORDS="~x86"
DEPEND=""

src_install() {

	local docs="AUTHORS LICENSE README INSTALL Changelog"
	
	webapp_src_preinst
	
	cd ${WORKDIR}/${P}
	dodoc ${docs}
	for doc in ${docs}; do
		rm -f ${doc}
	done
	cp -R * ${D}${MY_HTDOCSDIR}
	for y in `find . -name '*.php' -print ` ; do
		webapp_runbycgibin php ${MY_HTDOCSDIR}/$y
	done
	for y in `find . -type f -print` ; do
		webapp_serverowned ${MY_HTDOCSDIR}/$y
	done

	webapp_src_install
}

